<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <title>houselai-admin</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/favicon.ico"/>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->

    <link rel="stylesheet" type="text/css" href="/static/css/admin/bootstrap.min14ed.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/admin/font-awesome.min93e3.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/admin/plugins/dataTables/dataTables.bootstrap.css">
        <link rel="stylesheet" type="text/css" href="/static/css/admin/animate.min.css"/>
        <link rel="stylesheet" type="text/css" href="/static/css/admin/style.min862f.css"/>
        <link href="/static/css/admin/admincommon.css?v=20180820" rel='stylesheet' type='text/css'/>
        </head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>转账管理列表</h5>
                    <div class="ibox-tools">
                        <a href="javascript:location.replace(location.href);" class="btn btn-primary btn-circle"
                           type="button" style="margin-bottom:0px;margin-right:10px;position:relative;top:-5px;"
                           title="刷新">
                            <i class="fa fa-refresh"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form action="" method="post">
                        <div class="form-group col-sm-3" style="padding-left:0px;">
                            <input type="text" id="keywords" name="keywords" value="{$keywords}" placeholder="输入用户名称"
                                   class="form-control" onkeyup="searchTitle(this);"/>
                        </div>
                        <button type="submit" class="btn btn-xm btn-primary">搜索</button>
                    </form>
                    <table id="mytable" class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>转账者</th>
                            <th>接收者</th>
                            <th>金额</th>
                            <th>描述</th>
                            <th>转账类型</th>
                            <th>转账者账户类型</th>
                            <th>接收者账户类型</th>
                            <th>生成时间</th>
                            <!--<th>操作</th>-->
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="data" id="vo">
                            <tr class="gradeX" id="article-{$vo['id']}">
                                <td>{$vo['id']}</td>
                                <td>{$vo['name']}</td>
                                <td>{$vo['to_name']}</td>
                                <td>
                                    <if condition="$vo['type'] eq 1">
                                        +{$vo['amount']}
                                        <else/>
                                        -{$vo['amount']}
                                    </if>
                                </td>
                                <td>{$vo['description']}</td>
                                <td>
                                    <if condition="$vo['status'] eq 1">
                                        转账至会员
                                        <else/>
                                        转账至其他账户
                                    </if>
                                </td>
                                <td>
                                    <!--1 理财账户 2 投资账户 3 对冲账户 4 奖金账户-->
                                    <if condition="$vo['uid_account'] eq 1">
                                        理财账户
                                        <elseif condition="$vo['uid_account'] eq 2"/>
                                        投资账户
                                        <elseif condition="$vo['uid_account'] eq 3"/>
                                        对冲账户
                                        <elseif condition="$vo['uid_account'] eq 4"/>
                                        奖金账户
                                        <else/>
                                        未知账户
                                    </if>
                                </td>
                                <td>
                                    <if condition="$vo['to_uid_account'] eq 1">
                                        理财账户
                                        <elseif condition="$vo['to_uid_account'] eq 2"/>
                                        投资账户
                                        <elseif condition="$vo['to_uid_account'] eq 3"/>
                                        对冲账户
                                        <elseif condition="$vo['to_uid_account'] eq 4"/>
                                        奖金账户
                                        <else/>
                                        未知账户
                                    </if>
                                </td>
                                <td>{$vo['add_time']}</td>
                                <!--<td class="center" align="center">-->
                                <!--<div class="btn-group">-->
                                <!--<button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle"-->
                                <!--aria-expanded="false">操作 <span class="caret"></span>-->
                                <!--</button>-->
                                <!--<ul class="dropdown-menu">-->
                                <!--<if condition="check_auth('admin/Product/del')">-->
                                <!--<li><a href="javascript:;" data-id="{$vo['id']}"-->
                                <!--class="font-bold del-article">删除</a></li>-->
                                <!--</if>-->
                                <!--</ul>-->
                                <!--</div>-->
                                <!--</td>-->
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    {$page|raw}
                </div>
            </div>
        </div>
    </div>
</div>
<js href="/static/js/admin/jquery.min.js"/>
<js href="/static/js/admin/bootstrap.min.js"/>
<js href="/static/js/admin/content.min.js"/>
<js href="/static/js/admin/plugins/layui/layer/layer.js"/>
<script type="text/javascript" src="/static/js/admin/admincommon.js?v=20180820"></script>

<script>
    $(document).ready(function () {

        $("#toggle_modal").on('click', function () {
            $(location).attr('href', "{:url('admin/Product/add')}");
        });
    });

    $(".ibox-content").on('click', '.del-article', function () {
        var article_id = $(this).data("id");
        layer.confirm("你确定要删除ID为【" + article_id + "】的产品吗？", {

            btn: ['确定', '取消'] //按钮

        }, function () {

            $.post("{:url('admin/Product/del')}", {id: article_id}, function (data) {

                if (data.code == 1) {

                    layer.msg(data.msg, {time: 500, icon: 1});

                    $("#article-" + article_id).remove();

                } else {

                    layer.msg(data.msg, {time: 500, icon: 2});

                }

            }, 'json');

        });
    });

    function searchTitle(obj) {
        var keywords = $.trim($(obj).val());

        if (keywords.length <= 0) {
            window.location.replace(location.href);
        }
    }

</script>

</body>
</html>